﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Configuration;

namespace CeA.Reports.Atendimento.DataAccess.Helpers {
    class ConfigurationHelper {

        public static string GetOracleConnectionStringQMATIC() {
            string connectionString = null;

            if (ConfigurationManager.ConnectionStrings["OracleQMATIC"] != null)
                connectionString = ConfigurationManager.ConnectionStrings["OracleQMATIC"].ConnectionString;
            else
                //TODO: Deixar Null para deploy
                connectionString = "Data Source=XEHome;User Id=admqmaticXXX;Password=abcd1234;";

            if (connectionString == null) {
                throw new InvalidOperationException("String de conexão com Oracle não configurada corretamente. Verifique.");
            }

            return connectionString;
        }
    }
}
